<?php
namespace Home\Controller;

use Think\Controller;

class IndexController extends Controller {
	
    public function indexAction() {
//     	layout(false);
//     	$this->display();
//     	http://w.wmfl.cn/index.php/Home/DisShop?sid=1&debug=zhangrui.songyi&debugUid=29
//     	redirect(U('Home/Site/index', array('sid'=>1)));
        $host = $_SERVER['HTTP_HOST'];
        $host = explode('.', $host);
        if (count($host)==4){
            $sid = $host[0];
        } 
        $controller = CONTROLLER_NAME == 'Index' ? 'Site' : CONTROLLER_NAME;
         $this->redirect("$controller/index", array('sid'=>$sid));
    }
    
    public function serverAction(){
    }
    
}
